package com.zbkj.crmeb.store.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 喜洋洋商品映射对象
 * @Description:
 * @author daigb
 * @date 2021-06-02
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class LeamProductResDTO {

    /**
     * 商品数据
     */
    @JsonProperty(value = "products")
    private List<LeamGoodsRes> products;

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class LeamGoodsRes {
        /**
         * 商品id
         */
        @JsonProperty(value = "product_id")
        private Integer productId;

        /**
         * style_code
         */
        @JsonProperty(value = "style_code")
        private String styleCode;

        /**
         * fabric_code
         */
        @JsonProperty(value = "fabric_code")
        private String fabricCode;

        /**
         * fabric_code
         */
        @JsonProperty(value = "color_code")
        private String colorCode;

        /**
         * 商品名称
         */
        @JsonProperty(value = "name")
        private String name;

        /**
         * 品牌
         */
        @JsonProperty(value = "brand")
        private String brand;

        /**
         * 季节+年份的缩写
         */
        @JsonProperty(value = "season")
        private String season;

        /**
         * 秋季/冬季/春季/夏季
         */
        @JsonProperty(value = "season_type")
        private String seasonType;

        /**
         * Men or Women
         */
        @JsonProperty(value = "department")
        private String department;

        /**
         * 分类
         */
        @JsonProperty(value = "category")
        private String category;

        /**
         * subcategory
         */
        @JsonProperty(value = "subcategory")
        private String subcategory;

        /**
         * 颜色
         */
        @JsonProperty(value = "color")
        private String color;

        /**
         * 意大利零售价格含税
         */
        @JsonProperty(value = "default_price")
        private BigDecimal defaultPrice;

        /**
         * 不含税的折扣价格
         */
        @JsonProperty(value = "price")
        private BigDecimal price;

        /**
         * discount percentage applied
         */
        @JsonProperty(value = "sale")
        private Integer sale;

        /**
         * madein
         */
        @JsonProperty(value = "madein")
        private String madein;

        /**
         * 成分
         */
        @JsonProperty(value = "composition")
        private String composition;

        /**
         * ATTENTION! incomplete data
         */
        @JsonProperty(value = "nomenclature")
        private Long nomenclature;

        /**
         * 描述
         */
        @JsonProperty(value = "description")
        private String description;

        /**
         * pic1
         */
        @JsonProperty(value = "pic1")
        private String pic1;

        /**
         * pic2
         */
        @JsonProperty(value = "pic2")
        private String pic2;

        /**
         * pic3
         */
        @JsonProperty(value = "pic3")
        private String pic3;

        /**
         * pic4
         */
        @JsonProperty(value = "pic4")
        private String pic4;

        /**
         * pic5
         */
        @JsonProperty(value = "pic5")
        private String pic5;

        /**
         * available_size
         */
        @JsonProperty(value = "available_size")
        private List<LeamSku> availableSize;

        @Data
        @JsonIgnoreProperties(ignoreUnknown = true)
        public static class LeamSku {
            /**
             * stock_id
             */
            @JsonProperty(value = "stock_id")
            private String stockId;

            /**
             * size
             */
            @JsonProperty(value = "size")
            private String size;

            /**
             * qty
             */
            @JsonProperty(value = "qty")
            private Integer qty;
        }
    }

}
